@keyframes leave {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@baseSelector: alert;
@infoBgColor: #e6f7ff;
@infoBorderColor: #91d5ff;
@warningBgColor: #fffbe6;
@warningBorderColor: #ffe58f;
@errorBgColor: #fff2f0;
@errorBorderColor: #ffccc7;
@successBgColor: #f6ffed;
@successBorderColor: #b7eb8f;
@color: rgba(0, 0, 0, 0.85);
@closeActiveColor: fadeout(@color, 25%);
.@{baseSelector} {
  box-sizing: border-box;
  margin: 0;
  color: @color;
  font-size: 14px;
  line-height: 1.5715;
  list-style: none;
  position: relative;
  display: flex;
  align-items: center;
  padding: 8px 15px;
  word-wrap: break-word;
  border-radius: 2px;
  border: 1px solid transparent;
  &.@{baseSelector}-block {
    width: percentage(1);
  }
  &.@{baseSelector}-info {
    background-color: @infoBgColor;
    border-color: @infoBorderColor;
  }

  &.@{baseSelector}-warning {
    background-color: @warningBgColor;
    border-color: @warningBorderColor;
  }

  &.@{baseSelector}-error {
    background-color: @errorBgColor;
    border-color: @errorBorderColor;
  }

  &.@{baseSelector}-success {
    background-color: @successBgColor;
    border-color: @successBorderColor;
  }

  .@{baseSelector}-close {
    margin-left: 8px;
    padding: 0;
    overflow: hidden;
    font-size: 16px;
    line-height: 12px;
    background-color: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    margin: 0;
    color: @color;
    position: absolute;
    right: 10px;
    top: 10px;
    &:hover {
      color: @closeActiveColor;
    }
  }
}
